/**
 * Created by John on 2017/9/21.
 */
var exclude_urls = {};
var prefix = '/smtool_project/wxapp';
var exclude = {
    add:function (url) {
        if (url.indexOf(prefix)!=0 || url==prefix){
            console.log('exclude url add fail.');
            return this;
        }
        if(this.contains(url)) return this;
        exclude_urls[url] = true;
        return this;
    },
    contains:function (url) {
        return url && exclude_urls[url];
    }
};

exclude
    .add(prefix + '/login')
    .add(prefix + '/stockpool/personal/export.xlsx')
    .add(prefix + '/stockpool/public/export.xlsx');

module.exports = exclude;